package com.wenhai.spring.dependency.injection;

import com.wenhai.xiaomage.spring.ioc.overview.dependency.domain.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 演示 proxyBeanMethods 作用
 *
 * @author wenhai
 * @date   2021/4/15
 */
@Configuration
public class ConfigurationProxyBeanMethod {


    @Bean
    public static User user1() {
        user2();
        return new User();
    }

    @Bean
    public static User user2() {
        System.out.println("user2()被调用");
        return new User();
    }
}
